home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Michael D. Crawford↵ / Word Services SDK 1.0.5 / Writeswell Jr. Source / UnloadStuff.c < prev    next >
Text File  |  1992-10-26  |  2KB  |  75 lines

  1. /* TestBed.c
  2.  * Word Services Testbed - main module for Writeswell Jr.
  3.  *
  4.  * ©1992 Working Software, Inc.
  5.  * This source code is copyrighted.  Permission is granted to use the Word Services
  6.  * portion of the Writeswell Jr. source code in your own programs, but you 
  7.  * may not distribute the Writeswell Jr. word-processor code as a 
  8.  * commercial product.  If you modify the code, please do not call it 
  9.  * Writeswell Jr. (or Writeswell.)  This will ensure that people understand the 
  10.  * program and don’t have to deal with a number of different versions with 
  11.  * who-knows-what going on in the code.
  12.  * 
  13.  * Writeswell Jr. and Writeswell are trademarks of Working Software, Inc.
  14. */
  15.  
  16. #include <EPPC.h>
  17. #include <AppleEvents.h>
  18. #include <AEObjects.h>
  19. #include <Printing.h>
  20. #include "AERegistry.h"
  21. #include "WordServices.h"
  22. #include "TestBed.h"
  23. #include "TBConstants.h"
  24. #include "MyFiles.h"
  25. #include "GenHandlers.h"
  26. #include "AppEvents.h"
  27. #include "AEObj.h"
  28. #include "InitMenu.h"
  29. #include "Gripe.h"
  30. #include "Scroll.h"
  31. #include "Prefs.h"
  32. #include "DoChecking.h"
  33. #include "ServiceMgr.h"
  34. #include "ObWind.h"
  35. #include "ObText.h"
  36. #include "ObNull.h"
  37. #include "ObOspec.h"
  38. #include "FontMenu.h"
  39. #include "Options.h"
  40. #include "ServiceDialog.h"
  41. #include "PrintWWJr.h"
  42. #include "UnloadStuff.h"
  43. #include "PageSetup.h"
  44.  
  45. void UnloadStuff( void )
  46. {
  47.     UnloadForPrint();
  48.     UnloadSeg( DoPrint );
  49.     
  50.     return;
  51. }
  52.  
  53. void UnloadForPrint( void )
  54. {
  55.     /* Unload all the segments but the print segment, so that as much memory is
  56.      * released as possible while printing
  57.      */
  58.  
  59.     UnloadSeg( DoOpenDialog );
  60.     UnloadSeg( DispatchOspec );
  61.     UnloadSeg( DispatchWind );
  62.     UnloadSeg( DispatchTEText );
  63.     UnloadSeg( DispatchNull );
  64.     UnloadSeg( DoControl );
  65.     UnloadSeg( DoSpellCheck );
  66.     UnloadSeg( PutUpMenus );
  67.     UnloadSeg( DoFontMenu );
  68.     UnloadSeg( OptionsDialog );
  69.     UnloadSeg( DoOpenDialog );
  70.     UnloadSeg( DoPageSetup );
  71.  
  72.     return;
  73. }
  74.  
  75.